var aArray = new Array( 5 );


for( var i = 0; i < aArray.length; i = i + 1 )
{
	aArray[ i ] = 0;
}

function showImage( nIndex )
{
	aArray[ nIndex ] = aArray[ nIndex ] + 1;
}
		
			function showBrazil()
			{
				document.getElementById("picture").src="images/brazilflag.jpg";
				document.getElementById("picture").alt="This is a picture of a lion relaxing";
				document.getElementById("picture").title="This is a picture of a lion relaxing";	
				
				document.getElementById("caption").innerHTML="<strong>Brazil is the biggest country in South America</strong>";
				
				document.getElementById("picture2").src="images/saopaulobrazil.jpg";
				document.getElementById("picture2").alt="This is a picture of a Sao Paulo";
				document.getElementById("picture2").title="This is a picture of Sao Paulo";
				
				
				aArray[ 0 ] = aArray[ 0 ] + 1;
				
			}
		
			function showPeru()
			{
				document.getElementById("picture").src="images/prueflag.jpg";
				document.getElementById("picture").alt="This is a picture of a lion relaxing";
				document.getElementById("picture").title="This is a picture of a lion relaxing";	
				
				document.getElementById("caption").innerHTML="<strong>The Peruvian population is estimated at 29.5 million people</strong>";
				
				document.getElementById("picture2").src="images/plazaperu.jpg";
				document.getElementById("picture2").alt="This is a picture of a Sao Paulo";
				document.getElementById("picture2").title="This is a picture of Sao Paulo";
				
				aArray[ 1 ] = aArray[ 1 ] + 1;
			}
				
				function showArgentina()
			{
				document.getElementById("picture").src="images/argentinachurch.jpg";
				document.getElementById("picture").alt="This is a picture of a church in Argentina";
				document.getElementById("picture").title="This is a picture of a church in Argentina";	
				
				document.getElementById("caption").innerHTML="<strong>Argentina is home to over 40 million people</strong>";
				
				document.getElementById("picture2").src="images/argentinaflag.jpg";
				document.getElementById("picture2").alt="This is a picture the Argentinan flag";
				document.getElementById("picture2").title="This is a picture the Argentinan flag";	
				
				aArray[ 2 ] = aArray[ 2 ] + 1;
				
			}
				
				function showEcuador()
			{	
				document.getElementById("picture").src="images/ecuadorflag.jpg";
				document.getElementById("picture").alt="This is a picture the Argentinan flag";
				document.getElementById("picture").title="This is a picture the Argentinan flag";	
				
				document.getElementById("caption").innerHTML="<strong>Ecuador is home to over 15 million people</strong>";
				
				document.getElementById("picture2").src="images/familyfood.jpg";
				document.getElementById("picture2").alt="This is a picture of a Sao Paulo";
				document.getElementById("picture2").title="This is a picture of Sao Paulo";	
				
				aArray[ 3 ] = aArray[ 3 ] + 1;
				
			}
				
				function showColombia()
			{
				document.getElementById("picture").src="images/colombiaflag.jpg";
				document.getElementById("picture").alt="This is a picture of a lion relaxing";
				document.getElementById("picture").title="This is a picture of a lion relaxing";	
				
				document.getElementById("caption").innerHTML="<strong>Colombia population is over 46 million people</strong>";
				
				document.getElementById("picture2").src="images/colombianwomen.jpg";
				document.getElementById("picture2").alt="This is a picture of a Sao Paulo";
				document.getElementById("picture2").title="This is a picture of Sao Paulo";
				
				aArray[ 4 ] = aArray[ 4 ] + 1;
				
				
			}
				
			
				
				function showCounter()
				{
						
					if( aArray[ 0 ] > 0 && aArray[ 1 ] > 0 && aArray[ 2 ] > 0 
							&& aArray[ 3 ] > 0 && aArray[ 4 ] > 0 )
					{
					
						window.location = "page2.html";
					}
					else
					{
					alert( "The course is incomplete. Please visit all countries to complete this course" );
					}
